package com.lzy.pattern.decorator;

/**
 * @ClassName: Client
 * @Description: TODO
 * @Author: LiuZy
 * @Date: 2022/4/23 15:01
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        FastFood fastFood1 = new FriedNoodles(10, "炒面");

        System.out.println(String.format("品名：%s, 价格：%s", fastFood1.getDesc(), fastFood1.cost()));

        fastFood1 = new Egg(fastFood1, 1, "鸡蛋");
        System.out.println(String.format("品名：%s, 价格：%s", fastFood1.getDesc(), fastFood1.cost()));

        fastFood1 = new Bacon(fastFood1, 2.5, "培根");

        fastFood1 = new Egg(fastFood1, 1, "鸡蛋");
        System.out.println(String.format("品名：%s, 价格：%s", fastFood1.getDesc(), fastFood1.cost()));
    }

}